import request from "@/utils/request";

// 查询房间信息列表
export function listRoomApi(query) {
  return request({
    url: '/room/list',
    method: 'get',
    params: query
  })
}

// 查询房间信息详细
export function getRoomApi(id) {
  return request({
    url: '/room?id=' + id,
    method: 'get',
  })
}

// 新增房间信息
export function addRoomApi(data) {
  return request({
    url: '/room',
    method: 'post',
    data: data
  })
}

// 修改房租信息
export function updateRoomApi(data) {
  return request({
    url: '/room',
    method: 'put',
    data: data
  })
}

// 删除房租信息
export function delRoomApi(id) {
  return request({
    url: '/room/' + id,
    method: 'delete'
  })
}
